import BuffUtil from '@/BuffUtil';
import UnitSpellEvent from '@/event/UnitSpellEvent';
import SelectUtil from '@/SelectUtil';
export default class Item_至宝龙珠 {
    static id = 'Assf';
    static 名称: string = '至宝龙珠';
    static 描述: string = '命中降低';
    static 图标: string = 'assets\\item\\INV_Elemental_Primal_Water.blp';
    static buffId: string = 'buff_item_zhibaolongzhu';
    static buffType: AppBuffType = {
        id: 'buff_item_zhibaolongzhu',
        name: Item_至宝龙珠.名称,
        ubertip: Item_至宝龙珠.描述,
        art: Item_至宝龙珠.图标,
        attribute: {
            命中: -0.5,
        },
        targetAttach: 'overhead',
        targetArt: 'Abilities\\Spells\\Other\\AcidBomb\\BottleImpact.mdl',
        dur: 5,
    };
    static 释放(x: number, y: number, 来源?: unit, 目标?: unit, d?: any) {
        let es = SelectUtil.getEnemyUnitsInRange(来源, 600);
        for (let e of es) {
            BuffUtil.addBuff(e, Item_至宝龙珠.buffId);
        }
    }
    constructor() {
        BuffUtil.registerBuffType(Item_至宝龙珠.buffType);
        se.onUnitSpellEffect(Item_至宝龙珠.spellEffect, Item_至宝龙珠.id);
    }
    static spellEffect(this: void, d: UnitSpellEvent) {
        Item_至宝龙珠.释放(d.spellTargetX, d.spellTargetY, d.trigUnit, d.spellTargetUnit, d);
    }
}
